package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.entity.Category;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

//@Mapper
public interface CategoryMapper {

    Page<Category> pageSelectCategory(Category category);

    @AutoFill(OperationType.UPDATE)
    void updateCategory(Category category);

    @AutoFill(OperationType.INSERT)
    void addCategory(Category category);

    Category selectCategoryById(Long id);

    Integer selectByCategoryIdDish(Long id);
@Delete("delete from category where id=#{id}")
    void deleteCategory(Long id);

    Integer selectByCategoryIdSetmeal(Long id);
}
